(function () {
    var basrUrl = "http://127.0.0.1:11209?";
    var URL = {
        query: basrUrl + "method=queryHistory"
    };
    var vue = new Vue({
        el: '#app',
        data: function () {
            return {
                always: 'always',
                historyList: []
            }
        },
        methods: {
            query: function () {
                var that = this;
                try{
                    var obj = window.fileOpt.queryHistory();
                    obj =  JSON.parse(obj);
                    if (obj.data.status === '1') {
                        if (obj.data.data) {
                            that.historyList =  obj.data.data;
                        }
                    } else {
                        that.$message(obj.data.msg);
                    }
                }catch (error){
                    that.$message(error.message);
                }

            }
        },
        created: function () {
            var that = this;
            setTimeout(function () {
                that.query();
            },1000);

        }
    });
})();